/*
 * Copyright 2013-2019 Xia Jun(3979434@qq.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ***************************************************************************************
 *                                                                                     *
 *                        Website : http://www.farsunset.com                           *
 *                                                                                     *
 ***************************************************************************************
 */
package com.echo.sdk.im.push;


import com.echo.sdk.im.enums.SocketHandlerEnum;
import com.echo.sdk.im.enums.SocketThemeEnum;
import com.echo.sdk.im.model.CIMMsg;

/**
 * @author chentl
 * @version V1.0
 * @Project IM-SDK
 * @Title CIMMessagePusher.java
 * @Description 消息推送接口
 * @Package com.ws.ztyt.msal.modular.im.push
 * @date 2020/9/6 3:51 下午
 */
public interface CIMMessagePusher {

    /**
     * @return void
     * @author chentl
     * @description 指定消息内容 广播所有连接 某条消息
     * @date 2020/9/10 1:23 下午
     * @params [webMsg]
     */
    void push(CIMMsg cimMsg);

    /**
     * @return void
     * @author chentl
     * @description 指定主题和消息内容 广播所有连接 某条消息
     * @date 2020/9/10 3:37 下午
     * @params [data, socketHandlerEnum, socketThemeEnum]
     */
    void push(Object data, SocketHandlerEnum socketHandlerEnum, SocketThemeEnum socketThemeEnum);


    /**
     * @return void
     * @author chentl
     * @description 广播所有连接现在有一条新消息。
     * 排除nid对应的连接。
     * nid参数若为空则全局广播
     * @date 2020/9/16 4:11 下午
     * @params [webMsg, nid]
     */
    void broadCoast(CIMMsg cimMsg, String nid);

}
